<%@ page import="com.ld.manageBook.service.BookService" %>
<%@ page import="com.ld.manageBook.service.impl.BookServiceImpl" %>
<%@ page import="com.ld.manageBook.bean.Books" %>
<%@ page import="com.ld.manageBook.bean.Borrow" %>
<%@ page import="java.time.LocalDateTime" %><%--
  Created by IntelliJ IDEA.
  User: 刘邓
  Date: 2023-06-02
  Time: 11:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>图书借阅</title>
</head>
<body>
<%!
    private BookService bookService = new BookServiceImpl();
%>
<%
    Integer id = Integer.parseInt(request.getParameter("id"));
    Books book = bookService.getBookById(id);
	session.setAttribute("currentBook",book);
%>
<form action="/home/borrowBookOutcome.jsp" method="post">
    书名:<input type="text" placeholder="<%=book.getName()%>" disabled><br>
    借阅数量:<input type="number" name="number" placeholder="当前存量为:<%=book.getNumber()%>"><br>
    <input type="submit" value="借阅">
</form>
</body>
</html>
